<?php

namespace ProjetA\GroupeBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class AttributType extends AbstractType
{
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder
            ->add('libelle')
            ->add('type', 'choice', array(
                'choices'=>array(
                    'text'=>'String',
                    'email'=>'email',
                    'url'=>'url',
                    'date'=>'Date',
                    'time'=>'heure',
                    'birthday'=>'birthday',
                    'integer'=>'Entier',
                    'textarea'=>'Textarea'),
                'preferred_choices' => array('string')
            ))
             
        ;
    }
    public function getDefaultOptions(array $options)
    {
        return array(
            'data_class' => 'ProjetA\GroupeBundle\Entity\Attribut',
        );
    }
    public function getName()
    {
        return 'projeta_groupebundle_attributtype';
    }
}
